<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>商品管理</title>
    <link rel="stylesheet" href="http://localhost/jumei/Static/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" href="http://localhost/jumei/Static/hdjs/hdjs.css" />
</head>
<body>
<div class="wrap">
    <table class="hd-table hd-table-list" style="text-align:center">
        <thead>
        <tr>
            <td width="70">商品id</td>
            <td width="100">商品名称</td>
            <td width="150">价格</td>
            <td width="70">库存</td>
            <td width="50">点击次数</td>
            <td width="100">添加时间</td>
            <td width="150">操作</td>
        </tr>
        </thead>
        <tbody>
            <?php foreach ($data as $k=>$v){?>
                <tr>
                    <td><?php echo $v['gid'];?></td>
                    <td><?php echo $v['gname'];?></td>
                    <td>
                        市场价格: <span style="text-decoration: line-through;"><?php echo $v['old_price'];?></span>
                        <br />
                        商场价格: <?php echo $v['new_price'];?>
                    </td>
                    <td><?php echo $v['total'];?></td>
                    <td><?php echo $v['click'];?></td>
                    <td><?php echo date('Y-m-d H:i',$v['time']);?></td>
                    <td>
                        <a href="<?php echo U('GoodsList/index',array('gid'=>$v['gid']));?>" class="btn btn-success btn-sm">货品列表</a>
                        <a href="<?php echo U('Goods/edit',array('gid'=>$v['gid']));?>" class="btn btn-primary btn-sm">编辑</a>
                        <a href="javascript:;" class="btn btn-danger btn-sm" onclick="if(confirm('确定要删除吗？')) location.href='<?php echo U('Goods/del',array('gid'=>$v['gid']));?>'">删除</a>
                    </td>
                </tr>
            <?php }?>
        </tbody>
    </table>
    <div class="page_hdjob">
      
    </div>
</div>

</body>
</html>


